// 利用第三方多个元素过渡
<template>
  <div>
    <button @click="isShow = !isShow">切换-显示/隐藏</button>
    <transition-group
      enter-active-class="animate__animated animate__backInDown"
      leave-active-class="animate__animated animate__backOutDown"
    >
      <h1 v-show="isShow" key="1">你好呀!</h1>
      <h1 v-show="!isShow" key="2">我的朋友!</h1>
    </transition-group>
  </div>
</template>

<script>
// 引入 animate样式库
import "animate.css";

export default {
  name: "my-test",
  data() {
    return {
      isShow: true,
    };
  },
};
</script>

<style scoped>
h1 {
  background-color: orange;
  position: absolute;
}
</style>
